package com.zhuoyue.biz.core.command.cmd.common.fe6.base;

/**
 * 空调风向
 * @author Administrator
 */
public enum AcWindDirectionEnum {
    /**
     * 自动
     */
    AUTO("AUTO", "01"),

    /**
     * 手动
     */
    MANUAL("MANUAL", "02");
    private String name;
    private String value;

    AcWindDirectionEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByName(String name) {
        AcWindDirectionEnum[] values = AcWindDirectionEnum.values();
        for (AcWindDirectionEnum acWindDirection : values) {
            if (acWindDirection.name.equalsIgnoreCase(name)) {
                return acWindDirection.getValue();
            }
        }
        return "FF";
    }

    public static String getNameByValue(String value) {
        AcWindDirectionEnum[] values = AcWindDirectionEnum.values();
        for (AcWindDirectionEnum acWindDirection : values) {
            if (acWindDirection.value.equalsIgnoreCase(value)) {
                return acWindDirection.getName();
            }
        }
        return "出错";
    }
}
